package com.fengze.business.mapper;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import com.fengze.business.domain.ProjectPlan;
import com.fengze.business.vo.ProjectPlanVO;
import org.apache.ibatis.annotations.Param;

/**
 * 项目计划Mapper接口
 * 
 * @author lug
 * @date 2024-02-02
 */
public interface ProjectPlanMapper 
{
    /**
     * 查询项目计划
     * 
     * @param id 项目计划主键
     * @return 项目计划
     */
    public ProjectPlan selectProjectPlanById(Long id);

    /**
     * 查询项目计划列表
     * 
     * @param projectPlan 项目计划
     * @return 项目计划集合
     */
    public List<ProjectPlan> selectProjectPlanList(ProjectPlan projectPlan);

    /**
     * 新增项目计划
     * 
     * @param projectPlan 项目计划
     * @return 结果
     */
    public int insertProjectPlan(ProjectPlan projectPlan);

    /**
     * 修改项目计划
     * 
     * @param projectPlan 项目计划
     * @return 结果
     */
    public int updateProjectPlan(ProjectPlan projectPlan);

    /**
     * 删除项目计划
     * 
     * @param id 项目计划主键
     * @return 结果
     */
    public int deleteProjectPlanById(Long id);

    /**
     * 批量删除项目计划
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteProjectPlanByIds(Long[] ids);

    void insertBatch(List<ProjectPlan> planList);

    void deleteByProjectIds(Long[] projectIds);

    List<ProjectPlan> selectByProjectId(Long projectId);

    List<ProjectPlanVO> queryRemindInfoListByDate(Date aheadDate);

    List<ProjectPlanVO> queryRemindInfoListLessDate(Date overDate);

    List<Long> queryProjectIdByLastDateAndStatus(@Param("lastDate")String lastDate,@Param("status") int status);

    int countByCondition(@Param("projectId") Long projectId, @Param("status") int status,@Param("today") String today);
}
